package com.ceac.kronos.ejb.entitybeans;

import java.io.Serializable;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQueries({
  @NamedQuery(name = "Role.findAll", query = "select o from Role o")
})
@Table(name = "ROLES")
public class Role implements Serializable {
    @Column(name="CREATED_BY")
    private Integer createdBy;
    @Column(name="CREATION_DATE")
    private Timestamp creationDate;
    private String description;
    @Column(name="LAST_UPDATED_BY")
    private Integer lastUpdatedBy;
    @Column(name="LAST_UPDATE_DATE")
    private Timestamp lastUpdateDate;
    @Id
    @Column(name="ROLE_ID", nullable = false)
    private Integer roleId;
    @Column(name="ROLE_NAME", nullable = false)
    private String roleName;
    @Column(name="USER_ROLE_NAME", nullable = false)
    private String userRoleName;

    public Role() {
    }

    public Role(Integer createdBy, Timestamp creationDate, String description,
                Timestamp lastUpdateDate, Integer lastUpdatedBy,
                Integer roleId, String roleName, String userRoleName) {
        this.createdBy = createdBy;
        this.creationDate = creationDate;
        this.description = description;
        this.lastUpdateDate = lastUpdateDate;
        this.lastUpdatedBy = lastUpdatedBy;
        this.roleId = roleId;
        this.roleName = roleName;
        this.userRoleName = userRoleName;
    }

    public Integer getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }

    public Timestamp getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Timestamp creationDate) {
        this.creationDate = creationDate;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(Integer lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Timestamp getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Timestamp lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getUserRoleName() {
        return userRoleName;
    }

    public void setUserRoleName(String userRoleName) {
        this.userRoleName = userRoleName;
    }
}
